package com.algorithms.binarytrees;

public class Node<T> {
	private int key;
	private T value;
	private Node<T> leftChild;
	private Node<T> rightChild;
	
	public Node(){
		this.key = -1;
		this.value = null;
	}
	
	public Node(int key){
		this.key = key;
		this.value = null;
	}
	
	public Node(int key, T value){
		this.key = key;
		this.value = value;
	}
	
	public int getKey() {
		return key;
	}
	public void setKey(int key) {
		this.key = key;
	}

	public T getValue() {
		return value;
	}
	public void setValue(T value) {
		this.value = value;
	}
	
	public Node<T> getLeftChild() {
		return leftChild;
	}
	public void setLeftChild(Node<T> leftChild) {
		this.leftChild = leftChild;
	}
	
	public Node<T> getRightChild() {
		return rightChild;
	}
	public void setRightChild(Node<T> rightChild) {
		this.rightChild = rightChild;
	}
}
